#include "PinQCategory.h"

TInt TPinQCategory::CategoryHandle() const
	{
	return iCategoryHandle;
	}
	
TQikCategoryName TPinQCategory::CategoryName() const
	{
	return iCategoryName;
	}
	
void TPinQCategory::SetCategoryHandle(TInt aCategoryHandle)
	{
	iCategoryHandle = aCategoryHandle;
	}

void TPinQCategory::SetCategoryName(TQikCategoryName aCategoryName)
	{
	iCategoryName = aCategoryName;
	}

void TPinQCategory::ExternalizeL(RWriteStream& aStream) const
	{
	aStream.WriteInt32L(iCategoryHandle);
	
	aStream << iCategoryName;
	}
	
void TPinQCategory::InternalizeL(RReadStream& aStream)
	{
	TBuf<EQikCategoryNameMaxLength> categoryName;
	
	iCategoryHandle = aStream.ReadInt32L();

	aStream >> categoryName;
	iCategoryName = categoryName;
	}
